package mn.idax.exchange.otc.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;

/**
 * @author 
 */
public class OTCOrder implements Serializable {
    private Integer id;

    private String uniquekey;

    private String number;

    private Integer type;

    private Integer adid;

    private Integer buyer;

    private Integer seller;

    private Integer selltype;

    private String sellaccount;

    private String pairname;

    private static final long serialVersionUID = 1L;

    private BigDecimal qty;
    private BigDecimal pairprice;

    private BigDecimal money;
    private Integer moneytype;
    private BigDecimal buyerprocedurefee;
    private BigDecimal buyerprocedurefeerate;
    private BigDecimal sellerprocedurefee;

    private Integer orderstate;

    private Integer ordersource;

    private Date caneltime;

    private Date expiretime;

    private Date createtime;

    private Date updatetime;
    private BigDecimal sellerprocedurefeerate;
    private Integer ordersubstate;

    private byte[] rowversion;
    private Integer coinid;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUniquekey() {
        return uniquekey;
    }

    public void setUniquekey(String uniquekey) {
        this.uniquekey = uniquekey;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getAdid() {
        return adid;
    }

    public void setAdid(Integer adid) {
        this.adid = adid;
    }

    public Integer getBuyer() {
        return buyer;
    }

    public void setBuyer(Integer buyer) {
        this.buyer = buyer;
    }

    public Integer getSeller() {
        return seller;
    }

    public void setSeller(Integer seller) {
        this.seller = seller;
    }

    public Integer getSelltype() {
        return selltype;
    }

    public void setSelltype(Integer selltype) {
        this.selltype = selltype;
    }

    public String getSellaccount() {
        return sellaccount;
    }

    public void setSellaccount(String sellaccount) {
        this.sellaccount = sellaccount;
    }

    public String getPairname() {
        return pairname;
    }

    public void setPairname(String pairname) {
        this.pairname = pairname;
    }

    public BigDecimal getPairprice() {
        return pairprice;
    }

    public void setPairprice(BigDecimal pairprice) {
        this.pairprice = pairprice;
    }

    public BigDecimal getQty() {
        return qty;
    }

    public void setQty(BigDecimal qty) {
        this.qty = qty;
    }

    public Integer getMoneytype() {
        return moneytype;
    }

    public void setMoneytype(Integer moneytype) {
        this.moneytype = moneytype;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public BigDecimal getBuyerprocedurefee() {
        return buyerprocedurefee;
    }

    public void setBuyerprocedurefee(BigDecimal buyerprocedurefee) {
        this.buyerprocedurefee = buyerprocedurefee;
    }

    public BigDecimal getBuyerprocedurefeerate() {
        return buyerprocedurefeerate;
    }

    public void setBuyerprocedurefeerate(BigDecimal buyerprocedurefeerate) {
        this.buyerprocedurefeerate = buyerprocedurefeerate;
    }

    public BigDecimal getSellerprocedurefee() {
        return sellerprocedurefee;
    }

    public void setSellerprocedurefee(BigDecimal sellerprocedurefee) {
        this.sellerprocedurefee = sellerprocedurefee;
    }

    public BigDecimal getSellerprocedurefeerate() {
        return sellerprocedurefeerate;
    }

    public void setSellerprocedurefeerate(BigDecimal sellerprocedurefeerate) {
        this.sellerprocedurefeerate = sellerprocedurefeerate;
    }

    public Integer getOrderstate() {
        return orderstate;
    }

    public void setOrderstate(Integer orderstate) {
        this.orderstate = orderstate;
    }

    public Integer getOrdersource() {
        return ordersource;
    }

    public void setOrdersource(Integer ordersource) {
        this.ordersource = ordersource;
    }

    public Date getCaneltime() {
        return caneltime;
    }

    public void setCaneltime(Date caneltime) {
        this.caneltime = caneltime;
    }

    public Date getExpiretime() {
        return expiretime;
    }

    public void setExpiretime(Date expiretime) {
        this.expiretime = expiretime;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public Integer getOrdersubstate() {
        return ordersubstate;
    }

    public void setOrdersubstate(Integer ordersubstate) {
        this.ordersubstate = ordersubstate;
    }

    public Integer getCoinid() {
        return coinid;
    }

    public void setCoinid(Integer coinid) {
        this.coinid = coinid;
    }

    public byte[] getRowversion() {
        return rowversion;
    }

    public void setRowversion(byte[] rowversion) {
        this.rowversion = rowversion;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OTCOrder other = (OTCOrder) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getUniquekey() == null ? other.getUniquekey() == null : this.getUniquekey().equals(other.getUniquekey()))
                && (this.getNumber() == null ? other.getNumber() == null : this.getNumber().equals(other.getNumber()))
                && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
                && (this.getAdid() == null ? other.getAdid() == null : this.getAdid().equals(other.getAdid()))
                && (this.getBuyer() == null ? other.getBuyer() == null : this.getBuyer().equals(other.getBuyer()))
                && (this.getSeller() == null ? other.getSeller() == null : this.getSeller().equals(other.getSeller()))
                && (this.getSelltype() == null ? other.getSelltype() == null : this.getSelltype().equals(other.getSelltype()))
                && (this.getSellaccount() == null ? other.getSellaccount() == null : this.getSellaccount().equals(other.getSellaccount()))
                && (this.getPairname() == null ? other.getPairname() == null : this.getPairname().equals(other.getPairname()))
                && (this.getPairprice() == null ? other.getPairprice() == null : this.getPairprice().equals(other.getPairprice()))
                && (this.getQty() == null ? other.getQty() == null : this.getQty().equals(other.getQty()))
                && (this.getMoneytype() == null ? other.getMoneytype() == null : this.getMoneytype().equals(other.getMoneytype()))
                && (this.getMoney() == null ? other.getMoney() == null : this.getMoney().equals(other.getMoney()))
                && (this.getBuyerprocedurefee() == null ? other.getBuyerprocedurefee() == null : this.getBuyerprocedurefee().equals(other.getBuyerprocedurefee()))
                && (this.getBuyerprocedurefeerate() == null ? other.getBuyerprocedurefeerate() == null : this.getBuyerprocedurefeerate().equals(other.getBuyerprocedurefeerate()))
                && (this.getSellerprocedurefee() == null ? other.getSellerprocedurefee() == null : this.getSellerprocedurefee().equals(other.getSellerprocedurefee()))
                && (this.getSellerprocedurefeerate() == null ? other.getSellerprocedurefeerate() == null : this.getSellerprocedurefeerate().equals(other.getSellerprocedurefeerate()))
                && (this.getOrderstate() == null ? other.getOrderstate() == null : this.getOrderstate().equals(other.getOrderstate()))
                && (this.getOrdersource() == null ? other.getOrdersource() == null : this.getOrdersource().equals(other.getOrdersource()))
                && (this.getCaneltime() == null ? other.getCaneltime() == null : this.getCaneltime().equals(other.getCaneltime()))
                && (this.getExpiretime() == null ? other.getExpiretime() == null : this.getExpiretime().equals(other.getExpiretime()))
                && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
                && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()))
                && (this.getOrdersubstate() == null ? other.getOrdersubstate() == null : this.getOrdersubstate().equals(other.getOrdersubstate()))
                && (this.getCoinid() == null ? other.getCoinid() == null : this.getCoinid().equals(other.getCoinid()))
                && (Arrays.equals(this.getRowversion(), other.getRowversion()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUniquekey() == null) ? 0 : getUniquekey().hashCode());
        result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getAdid() == null) ? 0 : getAdid().hashCode());
        result = prime * result + ((getBuyer() == null) ? 0 : getBuyer().hashCode());
        result = prime * result + ((getSeller() == null) ? 0 : getSeller().hashCode());
        result = prime * result + ((getSelltype() == null) ? 0 : getSelltype().hashCode());
        result = prime * result + ((getSellaccount() == null) ? 0 : getSellaccount().hashCode());
        result = prime * result + ((getPairname() == null) ? 0 : getPairname().hashCode());
        result = prime * result + ((getPairprice() == null) ? 0 : getPairprice().hashCode());
        result = prime * result + ((getQty() == null) ? 0 : getQty().hashCode());
        result = prime * result + ((getMoneytype() == null) ? 0 : getMoneytype().hashCode());
        result = prime * result + ((getMoney() == null) ? 0 : getMoney().hashCode());
        result = prime * result + ((getBuyerprocedurefee() == null) ? 0 : getBuyerprocedurefee().hashCode());
        result = prime * result + ((getBuyerprocedurefeerate() == null) ? 0 : getBuyerprocedurefeerate().hashCode());
        result = prime * result + ((getSellerprocedurefee() == null) ? 0 : getSellerprocedurefee().hashCode());
        result = prime * result + ((getSellerprocedurefeerate() == null) ? 0 : getSellerprocedurefeerate().hashCode());
        result = prime * result + ((getOrderstate() == null) ? 0 : getOrderstate().hashCode());
        result = prime * result + ((getOrdersource() == null) ? 0 : getOrdersource().hashCode());
        result = prime * result + ((getCaneltime() == null) ? 0 : getCaneltime().hashCode());
        result = prime * result + ((getExpiretime() == null) ? 0 : getExpiretime().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        result = prime * result + ((getOrdersubstate() == null) ? 0 : getOrdersubstate().hashCode());
        result = prime * result + ((getCoinid() == null) ? 0 : getCoinid().hashCode());
        result = prime * result + (Arrays.hashCode(getRowversion()));
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", uniquekey=").append(uniquekey);
        sb.append(", number=").append(number);
        sb.append(", type=").append(type);
        sb.append(", adid=").append(adid);
        sb.append(", buyer=").append(buyer);
        sb.append(", seller=").append(seller);
        sb.append(", selltype=").append(selltype);
        sb.append(", sellaccount=").append(sellaccount);
        sb.append(", pairname=").append(pairname);
        sb.append(", pairprice=").append(pairprice);
        sb.append(", qty=").append(qty);
        sb.append(", moneytype=").append(moneytype);
        sb.append(", money=").append(money);
        sb.append(", buyerprocedurefee=").append(buyerprocedurefee);
        sb.append(", buyerprocedurefeerate=").append(buyerprocedurefeerate);
        sb.append(", sellerprocedurefee=").append(sellerprocedurefee);
        sb.append(", sellerprocedurefeerate=").append(sellerprocedurefeerate);
        sb.append(", orderstate=").append(orderstate);
        sb.append(", ordersource=").append(ordersource);
        sb.append(", caneltime=").append(caneltime);
        sb.append(", expiretime=").append(expiretime);
        sb.append(", createtime=").append(createtime);
        sb.append(", updatetime=").append(updatetime);
        sb.append(", ordersubstate=").append(ordersubstate);
        sb.append(", coinid=").append(coinid);
        sb.append(", rowversion=").append(rowversion);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}